const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function (app) {
    console.log('app是'+app)
    app.use(
        createProxyMiddleware("/api", {
            target: "http://www.weather.com.cn/data/cityinfo", // 目标路径
            changeOrigin: true,
            pathRewrite: {
                "^/api": ""
            }
        })
    )
}